<template>
  <div>
    <h1>我是一级路由登陆成功</h1>
    <el-button type="primary" size="default">nish</el-button>
  </div>
</template>

<script setup lang="ts">
  import { onMounted } from 'vue'
  import useUserStore from '@/store/modules/user.ts'
  let userStore = useUserStore()
  onMounted(() => {
    // 引入pinia调用获取用户信息的方法并保存用户名和头像到pinia
    // 自动携带token请求接口
    userStore.getUserInfo()
  })
</script>

<style lang="scss" scoped></style>
